package com.onpositive.notes.argumnets;

import java.util.Date;

import com.onpositive.notes.label.providers.BasicLabelProvider;
import com.onpositive.notes.model.ITemplateModel;

public class DateArgumentModel extends BasicArgumentModel<Date,DateArgument> {

	public DateArgumentModel() {
		super();
	}

	private static final long serialVersionUID = -4977039586438572244L;

	public DateArgumentModel(String name, boolean isRequired) {
		super(Date.class, name, new BasicLabelProvider<Date>(Date.class), isRequired);
	}

	@Override
	public DateArgument createInstance(Date value, ITemplateModel<?> templateModel) {
		DateArgument arg = new DateArgument(value, this, isRequired) ;
		arg.setTemplateModelId( templateModel.getId() ) ;
		return arg;
	}
}
